package core;

import utils.RedisService;

public class Tools {

    public static void setSession(String account, String session, long expirationInSeconds) {
        //`garena-security:session:${account}`, JSON.stringify(session), { EX }
        RedisService.setSe("garena-security:session:"+account,expirationInSeconds,session);
    }

    public static String getSession(String account) {

        return RedisService.getSe("garena-security:session:"+account);
    }

    public static void deleteSession(String account) {
        RedisService.deleteSession(account);
    }

}
